package com.ylkj.wx.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.ylkj.wx.dto.LawyerInfoDTO;
import com.ylkj.wx.service.LawyerInfoQueryService;

@Controller
@RequestMapping("/lawyerInfo")
public class FindLawyerContrllor {
    private static final Logger logger = LoggerFactory.getLogger(QuestionListController.class);
    
    @Autowired
	private LawyerInfoQueryService lawyerInfoQueryService;
    
    @RequestMapping("/lawyerList")  
    public ModelAndView lawyerList(HttpServletRequest request, HttpServletResponse response) { 
    	Map<String, Object> param = new HashMap<String, Object>();
    	List<LawyerInfoDTO> lawyerInfoList = lawyerInfoQueryService.findLawyerInfoByParam(param);
    	return new ModelAndView("lawyerList", "lawyerInfoList", lawyerInfoList); 
    }  
    
    @RequestMapping("/lawyerAsk")  
    public ModelAndView question(HttpServletRequest request, HttpServletResponse response) { 
    	Map<String, Object> param = new HashMap<String, Object>();
    	List<LawyerInfoDTO> lawyerInfoList = lawyerInfoQueryService.findLawyerInfoByParam(param);
    	return new ModelAndView("lawyerAsk", "lawyerAsk", lawyerInfoList); 
    }  
    
}
